#include <bits/stdc++.h>
using namespace std;
char fisrt_happend(string& a)
{
    map<char,int> count;
    for(auto i:a)
    {
        if(!count.count(i))
            count.insert({i,1});
        else
            count[i]++;
    }
    for(auto i:count)
    {
        if(i.second == 1)
            return i.first;
    }
    return -1;
}
int main()
{
    string a = "abaccdeff";
    cout<<fisrt_happend(a);
}